<?php
   
  namespace app\common\utils;
   class Redis 
   {

   	 private static $_instance =null;

     public  static function  instance()
     {
     	if(self::$_instance === null)
     	{
     		self::$_instance = new \Redis();
     		self::$_instance->connect('127.0.0.1', '6379');
     	}
     	return self::$_instance;
     }
   }
?>